# -*- coding:utf-8 -*-

from sqlalchemy import Column, ForeignKey, Integer, DateTime, String
from config.database import BaseMixin, Base

class BgDownloadRecord(Base, BaseMixin):
    """
    下载记录表
    """
    __tablename__ = "bg_download_record"

    file_id = Column(Integer, nullable=False, comment='文件id')
    user_id = Column(Integer, nullable=False, comment='用户id')
    file_name = Column(String(255), comment='文件名称')
    file_size = Column(String(20), comment='文件大小')
    file_type = Column(String(50), comment='文件类型')
    file_cover = Column(String(255), comment='文件封面')
    user_name = Column(String(50), comment='用户名称')
    user_phone = Column(String(20), comment='用户手机')
    download_ip = Column(String(15), comment='下载IP')
    download_status = Column(String(1), default='1', comment='下载状态（0失败，1成功）')


